package com.example.demo.entity;

import java.util.Map;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;

public class UploadAddress {
    @Data
    public static class Request {
        @JsonProperty("file_id")
        private String fileId;

        @JsonProperty("name")
        private String name;

        @JsonProperty("size")
        private int size;

        @JsonProperty("digest")
        private Map<String, String> digest;

        @JsonProperty("is_manual")
        private boolean manual;

        @JsonProperty("attachment_size")
        private int attachmentSize;

        @JsonProperty("content_type")
        private String contentType;
    }

    public static class Response {
        @JsonProperty("url")
        private String url;

        @JsonProperty("method")
        private String method;

        @JsonProperty("headers")
        private Map<String, String> extraHeaders;

        @JsonProperty("params")
        private Map<String, String> extraParams;

        @JsonProperty("send_back_params")
        private Map<String, String> sendBackParams;

        public void setUrl(String url) {
            this.url = url;
        }

        public void setMethod(String method) {
            this.method = method;
        }

        public void setExtraHeaders(Map<String, String> extraHeaders) {
            this.extraHeaders = extraHeaders;
        }

        public void setExtraParams(Map<String, String> extraParams) {
            this.extraParams = extraParams;
        }

        public void setSendBackParams(Map<String, String> sendBackParams) {
            this.sendBackParams = sendBackParams;
        }
    }
}
